package com.jake.xpage.demos.applemusic.pages;

import android.content.Context;
import android.view.LayoutInflater;
import android.widget.TextView;

import androidx.annotation.NonNull;

import com.jake.xpage.R;
import com.jake.xpage.demos.applemusic.AppMusicNavigator;
import com.jake.xpage.demos.applemusic.AppleMusicPageRouteDef;
import com.jake.xpage.page.XPage;

public class AMSearchPage extends XPage {
    public AMSearchPage(@NonNull Context context) {
        super(context);
        LayoutInflater.from(getContext()).inflate(R.layout.common_demo_page, this);
        TextView textView = findViewById(R.id.tv_demo);
        textView.setText("这是搜索页\n点击进入二级页面");
        textView.setOnClickListener(v -> {
            AppMusicNavigator.openUrl(AppleMusicPageRouteDef.SUB_PAGE);
        });
    }
}
